package com.xbongbong.pro.statistic.result.pojo;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.PaasStageEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 漏斗vo，封装各个阶段的信息
 * @author zcp
 * @version v1.0
 * @date 2019/3/8 14:06
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class StageFunnelPojo implements Serializable {
    private static final long serialVersionUID = 4882582037918375946L;

    /**
     * 总数
     */
    private Integer total;
    /**
     * 阶段id--该阶段对应的相关信息pojo
     */
    private Map<String, StageFunnelInfoPojo> stageIdInfoMap;
    /**
     * 阶段集合
     */
    List<? extends PaasStageEntity> saleStageList;
    /**
     * 计算停留时长的阶段code集合
     */
    private List<String> calcStayStageCodeIn;
    /**
     * 阶段id--该阶段对应的数量、金额Object
     */
    private Map<String, JSONObject> stageIdObjectMap;

    public StageFunnelPojo(Integer total, Map<String, StageFunnelInfoPojo> stageIdInfoMap, List<? extends PaasStageEntity> saleStageList, List<String> calcStayStageCodeIn) {
        this.total = total;
        this.stageIdInfoMap = stageIdInfoMap;
        this.saleStageList = saleStageList;
        this.calcStayStageCodeIn = calcStayStageCodeIn;
    }

    public StageFunnelPojo(Integer total, Map<String, JSONObject> stageIdObjectMap) {
        this.total = total;
        this.stageIdObjectMap = stageIdObjectMap;
    }
}
